<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" >  

    <!--    <h:body>-->
    <ui:composition template="layout.xhtml">

        <ui:define name="corpo">
            <h:form id="index_form" acceptcharset="utf-8"> 
                <p:panel header="Principal - Campo Ato">
 
                    <br/>
                    <h:panelGrid style="float: right;" columns="4">
                        <p:graphicImage url="/media/img/new.png" title="Cadastrar Campo Ato" /> <p:commandLink  value="Cadastrar" title="Cadastrar Campo Ato" actionListener="#{managerAtoCampo.redirect('criarAtoCampo.xhtml')}" update="@form"/>
<!--                        <p:graphicImage url="/media/img/search.png" title="Pesquisar Ato Tipo"/><p:commandLink value="Pesquisar" title="Pesquisar Ato Tipo" actionListener="{managerAtoTipo.pesquisarAtoTipo()}" update="@form"/>-->
                    </h:panelGrid>
                    <br/>
                    <br/>
                    <h:panelGrid columns="2" width="970" styleClass="textAlignRight" columnClasses="textAlignRight"> 
                        <p:dataTable id="campoTable" var="atos" value="#{managerVisualizarAtoCampo.atoCampos}" 
                                     paginator="true" rows="5"
                                     paginatorPosition="bottom"
                                     paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"  
                                     rowsPerPageTemplate="5,10,15">    

                            <f:facet name="header">  
                                Todos Campo Atos Cadastrado
                            </f:facet>  
                            <p:column>  
                                <f:facet name="header" >   
                                    Nome
                                </f:facet>  
                                <h:outputText value="#{atos.nome}" style="font-weight: bold;"  />  
                            </p:column>
                            <p:column>  
                                <f:facet name="header" >   
                                    Tipo
                                </f:facet>  
                                <h:outputText value="#{atos.tipo}" style="font-weight: bold;"  />  
                            </p:column>
                            
                            <p:column style="width:70px;">  
                                <f:facet name="header">  
                                    <h:outputText value="Opções" />   
                                </f:facet>
                                <p:commandButton  icon="editar" label="Editar Ato Tipo"  actionListener="#{managerEditarAtoCampo.redirect('editarAtoCampo.xhtml',atos)}" update="@form"/>  
                                <p:commandButton  icon="view" label="Visualizar Ato Tipo"  actionListener="#{managerVisualizarAtoCampo.redirect('visualizarAtoCampo.xhtml',atos)}" update="@form"/>  

                            </p:column>

                        </p:dataTable> 
                    </h:panelGrid>

                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>
</html>
